home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1942 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.unix.osf.osf1,comp.lang.c
  4. Subject: Re: printf-problem
  5. Date: Wed, 17 Jan 96 21:59:21 GMT
  6. Organization: none
  7. Distribution: world
  8. Message-ID: <821915961snz@genesis.demon.co.uk>
  9. References: <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de>
  10. Reply-To: fred@genesis.demon.co.uk
  11. X-NNTP-Posting-Host: genesis.demon.co.uk
  12. X-Newsreader: Demon Internet Simple News v1.27
  13. X-Mail2News-Path: genesis.demon.co.uk
  14.  
  15. In article <4dj4g6$t9f@sunsystem5.informatik.tu-muenchen.de>
  16.            wist@lam.mw.tu-muenchen.de "Henrik Wist" writes:
  17.  
  18. >long int zahl;   /* which is e.g. 10000500001 */
  19. >printf("%d\n",zahl);      /* gives 1410565409, which is definitly wrong */
  20. >.
  21. >.
  22. >.
  23. >
  24. >Is that a problem of printf() or DG-UX or is it my problem that I don't know
  25. >the right conversion for printf(). Btw, printf("%u",zahl) didn't work either.
  26. >Any suggestions?
  27.  
  28. RTFM. 'man printf' will almost certainly tell you that the conversion
  29. specifier for longs is %ld.
  30.  
  31. -- 
  32. -----------------------------------------
  33. Lawrence Kirby | fred@genesis.demon.co.uk
  34. Wilts, England | 70734.126@compuserve.com
  35. -----------------------------------------
  36.